home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
set.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
1KB
|
67 lines
set(n) Tcl Built-In Commands
_________________________________________________________________
NAME
set - Read and write variables
SYNOPSIS
set _v_a_r_N_a_m_e ?_v_a_l_u_e?
_________________________________________________________________
DESCRIPTION
Returns the value of variable _v_a_r_N_a_m_e. If _v_a_l_u_e is speci-
fied, then set the value of _v_a_r_N_a_m_e to _v_a_l_u_e, creating a new
variable if one doesn't already exist, and return its value.
If _v_a_r_N_a_m_e contains an open parenthesis and ends with a
close parenthesis, then it refers to an array element: the
characters before the first open parenthesis are the name of
the array, and the characters between the parentheses are
the index within the array. Otherwise _v_a_r_N_a_m_e refers to a
scalar variable. If no procedure is active, then _v_a_r_N_a_m_e
refers to a global variable. If a procedure is active, then
_v_a_r_N_a_m_e refers to a parameter or local variable of the pro-
cedure unless the _g_l_o_b_a_l command has been invoked to declare
_v_a_r_N_a_m_e to be global.
KEYWORDS
read, write, variable
Tcl 1